<template>
  <div>
    <el-breadcrumb separator-class="el-icon-arrow-right" style="font-size: 16px;">
      <el-breadcrumb-item :to="{ path: '/' }">后台管理</el-breadcrumb-item>
      <el-breadcrumb-item>订单对应商品</el-breadcrumb-item>
    </el-breadcrumb>



    <el-divider></el-divider>

    <el-table
        :data="tableData"
        border
        style="width: 100%">
      <el-table-column prop="id" label="商品编号" width="150px" align="center"></el-table-column>
      <el-table-column prop="name" label="商品名称" width="150" align="center"></el-table-column>
      <el-table-column prop="money" label="金额" width="150" align="center"></el-table-column>
      <el-table-column prop="num" label="数量" width="250" align="center"></el-table-column>
    </el-table>

  </div>
</template>
<script>
import axios from "axios";

export default {
  data() {
    return {
      tableData: [],
      pack:{id:1,name:11},
      select1:{},
      pack1:{name:11},
      ruleForm: {

      },

    }
  },
  methods:{
    loadGoodsList(){
      let id=localStorage.getItem("id");
      console.log("id====",id)
      console.log('packlist')
      let url='http://localhost:8080/adminorders/goodslist/'+id;
      console.log('url='+url);
      this.axios.get(url).then((response)=>{
        let responseBody=response.data;
        this.tableData=responseBody.data;
      })
    }
  },
  mounted() {//挂载
    console.log('mounted')
    this.loadGoodsList();
  }

}
</script>